package com.zhangwei.day40share;

import android.content.Intent;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;

import com.zhangwei.day40share.jpush.JpushActivity_;
import com.zhangwei.day40share.share.ShareSdkActivity_;

import org.androidannotations.annotations.Click;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.ViewById;

@EActivity(R.layout.activity_main)
public class MainActivity extends ActionBarActivity {
    @ViewById
    Button shareBtn;
    @ViewById
    Button jpushBtn;

    @Click({R.id.share_btn, R.id.jpush_btn})
    public void onClick(View view) {
        Intent intent = null;
        switch (view.getId()) {
            case R.id.share_btn:
                intent = new Intent(this, ShareSdkActivity_.class);
                startActivity(intent);
                break;
            case R.id.jpush_btn:
                intent = new Intent(this, JpushActivity_.class);
                break;
        }
        startActivity(intent);
    }


}
